<?php
require_once 'BaseMySQLDAO.php';

class GameOnlineLinkDAO extends BaseMySQLDAO {

    public function __construct($context) {
        parent::__construct($context, 'game_online_link');
    }

    public function getGameOnlineLinkByGameCategoryId($id) {
        $result = array();
        try {
            $this -> getContext() -> getTransaction() -> startTransaction();

            $inSQL = "SELECT * FROM game_online_link WHERE game_category_id = :game_category_id ";
            $param = array('game_category_id' => $id);
            $result = $this -> getContext() -> getTransaction() -> getMySQLConnection() -> loadOneRow($inSQL, $param);

            $this -> getContext() -> getTransaction() -> closeTransaction();
        } catch (Exception $exception) {
            $this -> getContext() -> logException($exception);
        }
        return $result;
    }
}
?>